import query from '@dfeidao/atom-nodejs/db/query';
import log from '@dfeidao/atom-nodejs/logger/log';
import { systemid } from '../../atom/config';
interface Message {
	filter: {
		equip_type_no: string
	};
}




export default async function atom(msg: Message, action_id: string, session_id: string) {
	log(`Service begin`);
	// todo查询
	const { exec, prepare } = query(action_id, session_id, systemid);
	prepare('equipment_kind', ['_id', 'equip_type_no', 'equipment_kind_no', 'equipment_kind_name'], { equip_type_no: { $like: msg.filter.equip_type_no } }, 100, 1, [], []);


	const [rs] = await exec();


	log(`Service end`);
	return rs;
}
